{include file="public/header" title="后台管理系统"}
<body>
<div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 内容列表</strong></div>
    <div class="padding border-bottom">

        <ul class="search" style="padding-left:10px;">
            <li><a class="button border-main icon-plus-square-o" href="good_add.html"> 添加内容</a></li>
            <form action="{:url('Brand/brandList')}" method="get" id="F">
                <li>搜索：</li>
                <li>
                    <!--<select name="is_show" style="padding:5px 15px; border:1px solid #ddd;" >-->
                    <!--<option value="">选择</option>-->
                    <!--<option value="1" >是</option>-->
                    <!--<option value="0" >否</option>-->
                    <!--</select>-->
                    推荐
                    <select name="recommended" style="padding:5px 15px; border:1px solid #ddd;">
                        <option value="">选择</option>
                        <option value="1"
                                {if isset($recommended) && $recommended=='1'} selected
                                {/if} >是
                        </option>
                        <option value="0"
                                {if isset($recommended)&& $recommended=='0'} selected
                                {/if} > 否
                        </option>
                    </select>
                    显示:

                    是: <input type="checkbox" {if in_array(1,input('if_show',[]))}checked{/if}  value="1" name="if_show[]">

                    否: <input type="checkbox" {if in_array(0,input('if_show',[]))}checked{/if}  value="0" name="if_show[]">

                    有图:
                    <input type="checkbox" {if in_array(1,input('logos',[]))}checked{/if} value="1" name="logos[]">
                    无图:
                    <input type="checkbox" {if in_array(0,input('logos',[]))}checked{/if} value="0" name="logos[]">
                </li>
                <li>

                </li>
                <li>
                    <input type="text" placeholder="请输入搜索关键字" name="keywords" value="{:input('keywords')}" class="input"
                           style="width:200px; line-height:17px;display:inline-block"/>
                    <a href="javascript:F.submit();" class="button border-main icon-search"> 搜索</a></li>

                <li><a href="{:url('Brand/brandRedel')}">回收站</a></li>
            </form>
        </ul>
    </div>
    <table class="table table-hover text-center">
        <tr>
            <th width="10%">ID</th>
            <th width="15%">品牌名</th>
            <th width="20%">品牌LOGO</th>
            <th width="10%">是否推荐</th>
            <th width="10%">是否显示</th>
            <th width="10%">标签</th>
            <th width="10%">排序</th>
            <th width="15%">操作</th>
        </tr>
        {volist name="list['list']" id="v"}
        <tr>
            <td>{$v.brand_id}</td>
            <td>{$v.brand_name}</td>
            <td><img src="__STATIC__/{$v.brand_logo}" alt="" width="120" height="50"/></td>
            <td>{$v.recommended==1?'<img src="__STATIC__/images/√.jpg" alt="" width="50" height="50"/>':'<img
                    src="__STATIC__/images/X.jpg" alt="" width="50" height="50"/>'}
            </td>
            <td>{$v.if_show==1?'<img src="__STATIC__/images/√.jpg" alt="" width="50" height="50"/>':'<img
                    src="__STATIC__/images/X.jpg" alt="" width="50" height="50"/>'}
            </td>
            <td>{$v.tag}</td>
            <td>{$v.sort_order}</td>
            <td>
                <div class="button-group">
                    <a class="button border-main" href="{:url('Brand/brandEdit',['id'=>$v.brand_id])}"><span class="icon-edit"></span> 修改</a>
                    <a class="button border-red" href="{:url('Brand/brandDel',['id'=>$v.brand_id])}" onclick="return del(1,1)"><span
                            class="icon-trash-o"></span> 删除</a>
                </div>
            </td>
        </tr>
        {/volist}

        <td colspan="9">{$list['page']|raw}</td>
    </table>
</div>
<script type="text/javascript">
    function del(id, mid) {
        if (confirm("您确定要删除吗?")) {

        }
    }
</script>
<div class="panel admin-panel margin-top" id="add">
    <div class="panel-head"><strong><span class="icon-pencil-square-o"></span> 增加内容</strong></div>
    <div class="body-content">

        <form method="post" class="form-x" action="" enctype="multipart/form-data">

            <div class="form-group">
                <div class="label">
                    <label>品牌名：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="" name="brand_name" data-validate="required:请输入商品名" />
                    <div class="tips"></div>
                </div>
            </div>

            <div class="form-group">
                <div class="label">
                    <label>品牌LOGO：</label>
                </div>
                <div class="field">
                    <input type="text" data-image="images/logo.png" readonly id="url1" class="input tips" style="width:25%; float:left;" value="" data-toggle="hover" data-place="right" />
                    <input type="button"  class="button bg-blue margin-left" value="+ 浏览上传" >
                    <input type="file" name="img" onchange="url1.value=this.value" style="position:relative; z-index:1000px; filter:alpha(opacity=0);-moz-opacity:0; opacity:0; left:-155px;" />
                </div>
            </div>


            <div class="form-group">
                <div class="label">
                    <label>其他属性：</label>
                </div>
                <div class="field" style="padding-top:8px;">
                    推荐 <input name="if_show" id="if_show" value="1" type="checkbox" />
                    显示 <input name="recommended" id="recommended" value="1" type="checkbox" />
                </div>
            </div>

            <div class="form-group">
                <div class="label">
                    <label>标签：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" value="" name="tag" data-validate="required:请输入商品名" />
                    <div class="tips"></div>
                </div>
            </div>

            <div class="clear"></div>
            <div class="form-group">
                <div class="label">
                    <label>排序：</label>
                </div>
                <div class="field">
                    <input type="text" class="input w50" name="sort_order" value="0"  data-validate="number:排序必须为数字" />
                    <div class="tips"></div>
                </div>
            </div>


            <div class="form-group">
                <div class="label">
                    <label></label>
                </div>
                <div class="field">
                    <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
                </div>
            </div>
        </form>
    </div>
</div>
</body></html>